<!DOCTYPE html>
<html>
<head>
    <title>模块列表</title>
    <include file='public/head'>
        <style>
            .layui-width-100{width: 100px !important;}
            .layui-legend-size{font-size:14px !important;}
            .layui-nopadding{padding:0 !important;}
            .layui-nomargin{margin: 0 !important;}
            .layui-bottom{
                border-width: 0 0 1px 0;
                border-style: solid;
                border-color: rgb(226, 226, 226);
            }
            .layui-input{height:30px !important; }
            .layui-top-margin{margin: 2px 0;}
            .layui-left-margin{margin-left: 10px;}
            .layui-table-page {padding: 7px 0px 0px;}
        </style>
</head>
<body>
    <div class="layui-tab " lay-filter="demo-tab">
        <!-- layui-tab开始 -->
        <div class="layui-tab-nav">
            <!-- 顶部导航菜单开始 -->
            <ul class="layui-tab-title">
                <ul class="layui-tab-title">
                    {:getNav('module_config','module_list/index')};
                </ul>
            </ul>
        </div>
        <!-- 顶部导航菜单结束 -->
        <!-- 搜索栏开始 -->
        <fieldset class="layui-elem-field layui-field-title" style="border-width: 1px;padding-left: 10px;">
            <legend class="layui-legend-size">搜索</legend>
            <form class="layui-form table-bar" action="{:cmf_plugin_url('ModuleConfig://module_list/index')}" lay-filter="form-bar">
                <div class="layui-form-item" style="margin-bottom: 0px;">
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width: 100px;">
                            <select name="search" lay-filter="module_name" lay-search>
                                <option value=""></option>
                                <foreach name="module_list" item="vo">
                                    <option value="{$vo.title}" <?php if(isset($data['search']) && $vo['title'] == $data['search']){echo 'selected';}?>>{$vo.title}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button type="submit" class="layui-btn layui-btn-sm layui-btn-primary " style="font-weight:800;" lay-submit="" lay-filter="demo2"><i class="layui-icon ">&#xe615;</i>搜索</button>
                    </div>
                </div>
            </form>
        </fieldset>
        <!-- 搜索栏结束 -->
        <!-- 内容开始 -->
        <div class="layui-card">
            <!-- layui-card-body开始 -->
            <div class="layui-card-body layui-nopadding " >
                <table  class="layui-table layui-nomargin" >
                    <thead> 
                        <tr>
                            <th>会员管理</th>
                            <th>作者</th>
                            <th>模块标识</th>
                            <th>说明</th>
                            <th>版本</th>
                            <th>操作
                            </th>
                        </tr>
                    </thead>
                    <tbody >
                        <volist name="list" id="vo">
                            <tr>
                                <td>{$vo.title}</td>
                                <td>{$vo.author}</td>
                                <td>{$vo.name}</td>
                                <td>{$vo.describe}</td>
                                <td>{$vo.version}</td>
                                <td type="text/html" id="action_bar" width="100">
                                    <div class="layui-btn-group">
                                        <button type="button" class="layui-btn layui-btn-xs layui-btn-primary set-btn"  data-store_id="{$vo.store_id}" data-name="{$vo.name}" title="设置">
                                        <i class="layui-icon">&#xe614;</i>
                                        </button>
                                        <a href="{:cmf_plugin_url('ModuleConfig://help_file/index')}?id={$vo.word}" target="_blank" class="layui-btn layui-btn-xs layui-btn-primary word-btn" title="文档"><i class="layui-icon">&#xe705;</i></a>
                                    </div>
                                </td>
                            </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
            <!-- layui-card-body结束 -->
        </div>
        <!-- 内容结束 -->
    </div>
    <!-- layui-tab结束 -->
    <include file='public/scripts'>
    <script >
        //修改
        $('.set-btn').on('click', function(){
            let store_id = $(this).data('store_id');
            let name = $(this).data('name');
            let url = "{:cmf_plugin_url('ModuleConfig://plugin_list/index')}?name="+name+"&store_id="+store_id;
            var index = layer.open({
                type: 2
                ,title: '配置'
                ,shadeClose: true
                ,shade: 0.8
                ,area: [window.innerWidth+'px', window.innerHeight+'px']
                ,btn:['关闭']//操作按钮
                ,fixed:false
                ,maxmin:true
                ,content: url //iframe的url
            });
            layer.full(index);
        });
    </script>
</body>
</html>